package com.mate.cloud.oauth2.service;

import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Service;

/**
 * 接着定义UserDetailService实现org.springframework.security.core.userdetails.UserDetailsService接口
 * @author:         MI
 * @email:          448341911@qq.com
 * @createTime:     2024/6/11 18:19
 * @updateUser:     MI
 * @updateTime:     2024/6/11 18:19
 * @updateRemark:   修改内容
 * @version:        v1.0
 */
@Service
public interface UserDetailService extends UserDetailsService {

    /**
     * 是否支持此客户端校验
     * @param clientId 目标客户端
     * @return true/false
     */
    default boolean support(String clientId, String grantType) {
        return true;
    }

    /**
     * 排序值 默认取最大的
     * @return 排序值
     */
    default int getOrder() {
        return 0;
    }

}
